#include <REGX52.H>
#include"Delay.h"
#include"MatrixLED.h"

unsigned char Animation[]={0x3C,0x42,0xA9,0x85,0x85,0xA9,0x42,0x3C,
													0x3C,0x42,0xA1,0x85,0x85,0xA1,0x42,0x3C,
													0x3C,0x42,0xA5,0x89,0x89,0xA5,0x42,0x3C};
void main()
{
	unsigned char i=0;
	unsigned char count=0;
	unsigned char Offset=0;
	MatrixLED_Init();
	while (1)
	{
		for(i=0;i<8;i++)//循环8次，显示8列数据
		{
			MatrixLED_ShowCol(i,Animation[i+Offset]);
		}
		count++;//计次延时
		if(count>15)
		{
			count=0;
			Offset+=8;//偏移+8，切换下一帧画面
			if(Offset>16)
			{
				Offset=0;
			}
		}
		
	}
}